/*
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: 朱江洲
 * @Date: 2021-09-18 16:34:00
 * @LastEditors: 朱江洲
 * @LastEditTime: 2022-05-16 17:46:25
 */
import request from "@/utils/request.js";


// 获取用户信息
export const profile = () => {
    return request({
        method: 'get',
        url: '/system/user/profile',
    })
}

// 重置密码
export const updatePwd = params => {
    return request({
        method: 'get',
        url: '/system/user/profile/updatePwd',
        params
    })
}
// 验证码重置密码
export const updatePwdByCode = data => {
    return request({
        method: 'post',
        url: '/system/user/profile/updatePwdByCode',
        data
    })
}


// 保存/更新公司抬头
export const companyHead = data => {
    return request({
        method: 'post',
        url: '/system/user/profile/companyHead',
        data
    })
}


// 修改用户
export const updateProfile = data => {
    return request({
        method: 'post',
        url: '/system/user/profile/updateProfile',
        data
    })
}
// 获取验证码
export const getCode = params => {
    return request({
        method: 'get',
        url: '/system/user/profile/getCode',
        params
    })
}

// 获取公司列表
export const switchOrg = params => {
    return request({
        method: 'get',
        url: '/system/user/switchOrg',
        params
    })
}

// 切换用户
export const switchLogin = params => {
    return request({
        method: 'get',
        url: '/switchLogin',
        params
    })
}
// 创建团队
export const createTeam = params => {
    return request({
        method: 'get',
        url: '/system/user/createTeam',
        params
    })
}
// 加入团队
export const joinTeam = params => {
    return request({
        method: 'get',
        url: '/system/user/joinTeam',
        params
    })
}

// 获取logo跟简称
export const getLogo = params => {
    return request({
        method: 'get',
        url: '/getLogo',
        params
    })
}

// 获取通知
export const getMessageList = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/messageCenter/list',
        params
    })
}

// 删除通知
export const deleteNotice = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/messageCenter/delete',
        params
    })
}
// 删除已读
export const deleteReaded = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/messageCenter/deleteReaded',
        params
    })
}
// 标记为已读
export const readed = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/messageCenter/readed',
        params
    })
}
// 全部被标为已读
export const allReaded = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/messageCenter/allReaded',
        params
    })
}

// 判断是否是会员
export const checkVipExpiry = params => {
    return request({
        method: 'get',
        url: '/system/user/checkVipExpiry',
        params
    })
}
// 获取已购买套餐数据
export const getPackageInfo = params => {
    return request({
        method: 'get',
        url: '/company/vipPackage/getInfo',
        params
    })
}

// 获取证书信息

export function certInfo(id) {
    return request({
        url: '/cert/certInfo/' + id,
        method: 'get'
    })
}

// 获取资质信息

export function qualificationInfo(id) {
    return request({
        url: '/qualification/qualificationInfo/' + id,
        method: 'get'
    })
}


// 获取证书借还信息
export function certUse(id) {
    return request({
        url: '/qcert/certUse/' + id,
        method: 'get'
    })
}


// 获取合同详情
export const select = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/select',
        params
    })
}
// 是否合同有权限

export const haveContractRole = params => {
    return request({
        method: 'get',
        url: '/system/role/haveContractRole',
        params
    })
}

// 回款详情
export const xshkSelect = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/recovery/select',
        params
    })
}
// 回款计划详情
export const planSelect = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/recovery/planSelect',
        params
    })
}

// 是否有回款权限
export const haveRecoveryRole = params => {
    return request({
        method: 'get',
        url: '/system/role/haveRecoveryRole',
        params
    })
}

// 是否有支出合同权限
export const havePayContractRole = params => {
    return request({
        method: 'get',
        url: '/system/role/havePayContractRole',
        params
    })
}
// 是否有优惠设置页面权限
export const haveCouponRole = params => {
    return request({
        method: 'get',
        url: '/system/role/haveCouponRole',
        params
    })
}
// 获取优惠券详情
export const Couponselect = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/coupon/select',
        params
    })
}
